package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * describe:用户表
 *
 * @author rainly
 * @date 2019/12/06
 * @time 2:47 下午
 */
@ApiModel(value = "用户表", description = "用户表 sys_user")
@Data
@TableName(value = "sys_user")
public class SysUser extends BaseEntity<SysUser> {

    @ApiModelProperty(value = "user_id", name = "user_id", example = "32位uuid", required = true)
    @Id
    @Column(name = "user_id", length = 32, columnDefinition = "varchar(32) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String userId;

    @ApiModelProperty(value = "用户名", name = "user_name", example = "用户名", required = true)
    @Column(name = "user_name", length = 50, columnDefinition = "varchar(50) COMMENT '用户名'")
    private String userName;

    @ApiModelProperty(value = "登录名称", name = "login_name", example = "登录名称", required = true)
    @Column(name = "login_name", length = 50, columnDefinition = "varchar(50) COMMENT '登录名称'")
    private String loginName;

    @ApiModelProperty(value = "登录密码", name = "password", example = "登录密码", required = true)
    @Column(name = "password", length = 50, columnDefinition = "varchar(50) COMMENT '登录密码'")
    private String password;

    @ApiModelProperty(value = "手机号码", name = "phone", example = "手机号码", required = true)
    @Column(name = "phone", length = 50, columnDefinition = "varchar(50) COMMENT '手机号码'")
    private String phone;

    @ApiModelProperty(value = "邮箱", name = "email", example = "邮箱", required = true)
    @Column(name = "email", length = 50, columnDefinition = "varchar(50) COMMENT '邮箱'")
    private String email;

    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
